go/types.Checker.invalidArg (method)
20 uses
go/types (current package)
builtins.go#L223: check.invalidArg(x, code, "%s for %s", x, bin.name)
builtins.go#L312: check.invalidArg(x, _InvalidComplex, "mismatched types %s and %s", x.typ, y.typ)
builtins.go#L334: check.invalidArg(x, _InvalidComplex, "arguments have type %s, expected floating-point", x.typ)
builtins.go#L367: check.invalidArg(x, _InvalidCopy, "copy expects slice arguments; found %s and %s", x, &y)
builtins.go#L391: check.invalidArg(x, _InvalidDelete, "%s is not a map", x)
builtins.go#L395: check.invalidArg(x, _InvalidDelete, "maps of %s must have identical key types", x)
builtins.go#L466: check.invalidArg(x, code, "argument has type %s, expected complex type", x.typ)
builtins.go#L507: check.invalidArg(arg0, _InvalidMake, "cannot make %s; type must be slice, map, or channel", arg0)
builtins.go#L525: check.invalidArg(call.Args[1], _SwappedMakeArgs, "length and capacity swapped")
builtins.go#L654: check.invalidArg(arg0, _BadOffsetofSyntax, "%s is not a selector expression", arg0)
builtins.go#L669: check.invalidArg(x, _MissingFieldOrMethod, "%s has no single field %s", base, sel)
builtins.go#L676: check.invalidArg(arg0, _InvalidOffsetof, "%s is a method value", arg0)
builtins.go#L680: check.invalidArg(x, _InvalidOffsetof, "field %s is embedded via a pointer in %s", sel, base)
builtins.go#L740: check.invalidArg(x, _InvalidUnsafeSlice, "%s is not a pointer", x)
builtins.go#L761: check.invalidArg(x, _Test, "%s is not a boolean constant", x)
errors.go#L230: func (check *Checker) invalidArg(at positioner, code errorCode, format string, args ...any) {
index.go#L368: check.invalidArg(&x, _InvalidIndex, "index %s is out of bounds", &x)
index.go#L389: check.invalidArg(x, code, "%s %s must be integer", what, x)
index.go#L396: check.invalidArg(x, code, "%s %s must not be negative", what, x)
index.go#L402: check.invalidArg(x, code, "%s %s overflows int", what, x)